<form name='form1' id='form1' action='publicidades_izq_editar.php?id=<?php echo $id;?>' method='post' accept-charset="utf-8"> 
            <table width='100%' cellpadding="5" cellspacing="5">
                <tr >
                   <td nowrap style="color:#000000; font-weight:bold; font-size:14px;text-align:right;">Se mostrará en:</td>
                   <td>
                        <?php echo $select_familia;?>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <b>Plan Elegido</b>
                        <div id='plan_home' style='display:inline-block;'><?php echo $select_plan_home;?></div>
                        <div id='plan_interna' style='display:inline-block;'><?php echo $select_plan_interna;?></div>

                   </td>
                </tr>

                <tr>
                    <td style="color:#000000; font-weight:bold; font-size:14px;text-align:right;">Nombre:</td>
                    <td width='550' align='left'>
                        <input type='text'  name='titulo' id="titulo" value="<?php echo $data['titulo'];?>" size='90' maxlength='200' class="required"/>
                    </td>
                </tr>
                <tr>
                    <td style="color:#000000; font-weight:bold; font-size:14px;text-align:right;">Etiqueta ALT:</td>
                    <td width='550' align='left'>
                        <input type='text'  name='alt' id="alt" value="<?php echo $data['alt'];?>" size='90' maxlength='200' class="required"/>
                    </td>
                </tr>

                <tr>
                    <td style="color:#000000; font-weight:bold; font-size:14px;text-align:right;">Email:</td>
                    <td width='550' align='left'>
                        <input type='text'  name='email' id="email" value="<?php echo $data['email'];?>" size='90' maxlength='200'  class='required email'/>
                    </td>
                </tr>

                <tr>
                    <td colspan='2' style="color:#000000; font-weight:bold; font-size:14px;text-align:center;">
                        Teléfono 1: <input type='text'  name='telefono1' id="telefono1" value="<?php echo $data['telefono1'];?>" size='25' maxlength='60'/>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        Teléfono 2: <input type='text'  name='telefono2' id="telefono2" value="<?php echo $data['telefono2'];?>" size='25' maxlength='60'/>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        Fax: <input type='text'  name='fax' id="fax" value="<?php echo $data['fax'];?>" size='25' maxlength='60'/>
                    </td>
                </tr>

                <tr> 
                    <td style="color:#000000; font-weight:bold; font-size:14px;text-align:right;">Logo:<small><br>210px x 113px</small></td>
                    <td align='left' valign='top' width='100%'>
                        <table>
                            <tr>
                                <td><?php if (!empty($data['thumbs'])){ echo "<img src='{$data['thumbs']}' width='60' height='60'>";}?></td>
                                <td>
                                    <input type="text" name="thumbs" id="thumbs" size='80' maxlength='255' value="<?php echo $data['thumbs'];?>" /><br>
                                    <input type="button" value="Buscar en el servidor" onclick="BrowseServer( 'Images:/izq', 'thumbs' );" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
<!--                
                <tr> 
                    <td style="color:#000000; font-weight:bold; font-size:14px;text-align:right;">Banner Top:<small><br>700px x 200px</small></td>
                    <td align='left' valign='top' width='100%'>
                        <table>
                            <tr>
                                <td><?php if (!empty($data['banner_top'])){ echo "<img src='{$data['banner_top']}' width='120' height='60'>";}?></td>
                                <td>
                                    <input type="text" name="banner_top" id="banner_top" size='80' maxlength='255' value="<?php echo $data['banner_top'];?>" /><br>
                                    <input type="button" value="Buscar en el servidor" onclick="BrowseServer( 'Images:/banner', 'banner_top' );" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
-->
                <tr >
                    <td style="color:#000000; font-weight:bold; font-size:14px;text-align:right;">Script</td>
                    <td align='left'><textarea name='script' id='script' style='width:575px; height:50px;' ><?php echo $data['script'];?></textarea></td>
                </tr>

                <tr>
                    <td style="color:#000000; font-weight:bold; font-size:14px;text-align:right;">Web:</td>
                    <td width='550' align='left'>
                        <input type='text'  name='web' id="web" value="<?php echo $data['web'];?>" size='90' maxlength='200'  />
                    </td>
                </tr>
            </table>
            <table>    
                <tr>
                    <td style="color:#000000; font-weight:bold; font-size:14px;text-align:right;">Localidad:</td>
                    <td width='210' align='left'>
                        <select name='localidad' class='required' id='localidad' onblur="arma_direccion()">
                            <?php foreach($Localidades as $clave=>$valor){
                                if ($clave==$data['localidad']) { $sel ='selected=selected';} else {$sel='';}
                                echo "<option value='$clave' $sel>$valor</option>";
                            } ?>
                        </select>
                    </td>
                    <td style="color:#000000; font-weight:bold; font-size:14px;text-align:left;" >Provincia:</td>
                    <td><input type='text'  name='provincia' id="provincia" value="<?php echo $Config['default_provincia'];?>" readonly='readonly' style='width:100px;' class="required"/></td>
                    <td>País:</td>
                    <td><input type='text'  name='pais' id="pais" value="<?php echo $Config['default_pais'];?>" readonly='readonly' style='width:100px;' class="required"/></td>
                </tr>

            </table>
            <br><br>
    <input type='hidden' name='id' value='<?php echo $id;?>' />
    <input type='text'  name='test' id="test" value="." style='width:20px;color:#eee;' readonly='readonly'  class='required'/><b>Datos Obligatorios</b>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    
    <input type='submit' name='submit' value='<< Guardar los cambios >>'  />
</form>

<script language="javascript">
$(document).ready(function(){
    <?php if($familia_id==0){ ?>
            $("#plan_interna").hide();
    <?php } else { ?>
            $("#plan_home").hide();
    <?php } ?>

   $("#familia_id").change(function () {
           var elegido = $("#familia_id option:selected").val();
            if (elegido==0){
                $("#plan_home").show();
                $("#plan_interna").hide();
            } else {
                $("#plan_interna").show();
                $("#plan_home").hide();
            }
   })
});
</script>